package com.example.dzbsh.service;

import com.example.dzbsh.dao.DictQiyeleixingMapper;
import com.example.dzbsh.model.DictQiyeleixing;
import com.example.dzbsh.model.DictQiyeleixingExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DictQiyeleixingService {

    @Resource
    DictQiyeleixingMapper ddMapper;

    public List<DictQiyeleixing> findValid(){
        DictQiyeleixingExample mmExample = new DictQiyeleixingExample();
        mmExample.createCriteria().andIsvalidEqualTo(1);
        return ddMapper.selectByExample(mmExample);
    }

    public DictQiyeleixing findOne(String ppQiyeleixingId){
        return ddMapper.selectByPrimaryKey(ppQiyeleixingId);
    }
}
